package com.twu.biblioteca.factory;

import com.twu.biblioteca.BibliotecaApp;
import com.twu.biblioteca.Println;
import com.twu.biblioteca.Receiver;

public class GetUserInfoAction extends BasicAction {
    private GetUserInfoAction() {
    }
    private static GetUserInfoAction getUserInfoAction = null;

    public static GetUserInfoAction getInstance() {
        if(getUserInfoAction ==null){
            getUserInfoAction = new GetUserInfoAction();
        }
        return getUserInfoAction;
    }

    @Override
    public void run(BibliotecaApp bibliotecaApp, Receiver receiver) {
        String userInfo = bibliotecaApp.getCurrentUser().getUserInfo();
        Println.println(userInfo);
    }
}
